Skip to content

Conversation

@namse
Copy link
Contributor

@namse namse commented Dec 29, 2025

Currently, WasiHttpView::new_incoming_request enforces that the request body's error type must be exactly hyper::Error. This limits flexibility for implementations that might use a custom body type with a different error type that is still compatible with WASI HTTP errors.

This PR relaxes the trait bound on B::Error from strict hyper::Error to Into<ErrorCode>. To support this, a From<hyper::Error> implementation for ErrorCode has been added. This allows new_incoming_request to accept any body whose errors can be converted into an ErrorCode, making the API more generic and reusable.

@namse namse requested a review from a team as a code owner December 29, 2025 04:19
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue Jan 5, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 5, 2026
Merged via the queue into bytecodealliance:main with commit d175767 Jan 5, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants